package com.lhd._05weibo.pojo.dto;



import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;


/**
 * @author lhd
 * @date 2024/4/23
 * @apiNote
 */
@Data
public class UserRegDTO {
    //用户名 密码 昵称

    @ApiModelProperty(value = "用户名",required = true,example = "admin")
//    @NotNull(message = "用户名不能为null")
//    @NotEmpty(message = "用户名不能为空")
//    @NotBlank(message = "用户名不能为空白串")
//    @Size(min = 6, max = 12, message = "用户名长度必须在6到12之间")
//    @Pattern(regexp = "^(?:[\\u4e00-\\u9fff]{0,7}|.{0,14})$", message = "用户名不能超过7个汉字或者14个字符")
//    @Pattern(regexp = "^(?:(?:[\\u4e00-\\u9fa5]{1,7}$)|(?:[^\\u4e00-\\u9fa5]{1,14}$)|(?:[\\u4e00-\\u9fa5]{1,}[^\\u4e00-\\u9fa5]{1,13}$)|(?:[^\\u4e00-\\u9fa5]{1,7}[\\u4e00-\\u9fa5]{1,6}$)|(?:[\\u4e00-\\u9fa5][^\\u4e00-\\u9fa5]{1,6}[\\u4e00-\\u9fa5]{1,5}$)|(?:[^\\u4e00-\\u9fa5]{1,6}[\\u4e00-\\u9fa5]{1,6}[^\\u4e00-\\u9fa5]{1,}$)|(?:[\\u4e00-\\u9fa5]{1,5}[^\\u4e00-\\u9fa5]{1,}[\\u4e00-\\u9fa5]{1,5}[^\\u4e00-\\u9fa5]{1,}$)|(?:[^\\u4e00-\\u9fa5]{1,}[\\u4e00-\\u9fa5]{1,5}[^\\u4e00-\\u9fa5]{1,}[\\u4e00-\\u9fa5]{1,5}$))$")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,7}|[a-zA-Z]{1,14}$", message = "用户名不能超过7个汉字或14个字符")
    private String username;
    @ApiModelProperty(value = "密码",required = true)
    private String password;
    @ApiModelProperty(value = "昵称",required = true)
    private String nickname;

}
